package areNumbersAscending;

public class Solution {
    public boolean areNumbersAscending(String s) {
        //
        String[] words = s.split(" ");
        int last = -1;
        for (int i = 0; i < words.length; i++) {
            if(Character.isDigit(words[i].charAt(0))) {
                if(last == -1) {
                    last = i;
                } else {
                    if(Integer.parseInt(words[last]) >= Integer.parseInt(words[i])) return false;
                }
            }
        }
        return true;
    }
}
